package com.rich.paas.exception;


import com.rich.paas.enums.ResultCodeEnum;

/**
 * 业务异常
 * @author chenhao
 */
public class BusinessException extends Exception {

    private Integer errCode = ResultCodeEnum.FAILED.flag;
    private String message;

    public BusinessException() {
        this.message = "";
    }

    public BusinessException(String message) {
        this.message = message;
    }

    public BusinessException(String message, Integer errCode) {
        this.message = message;
        this.errCode = errCode;
    }

    public BusinessException(String message, Throwable t) {
        super(message, t);
        this.message = message;
    }

    public Integer getErrCode() {
        return errCode;
    }

    public void setErrCode(Integer errCode) {
        this.errCode = errCode;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
